import { Vec3 } from "cc";
import Common from "../utils/Common";

/**
 * 所有商品品类的数据模型
 */
export class checkinModel {
    constructor(index: number, num: number, date: number, state: number, targetId?: number) {
        this.index = index;
        this.num = num;
        this.date = date;
        this.state = state;
        this.targetId = targetId;
    }
    public index: number = 0;
    /**
     * 时间
     */
    public date: number = 0;

    /**
     * 
     */
    public get dateStr(): string {
        return Common.formatTime(new Date(this.date));
    }

    /**
    * 目标ID
    */
    public targetId?: number = 0;
    /**
     * 数量
     */
    public num: number = 0;

    /**
     * 状态 0 未签到  1已签到
     */
    public state: number = 0;
}
